#
#   Level.py
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; version 2 of the License.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   Copyright
#   Author: Salvatore S. Gionfriddo
#   Contributors: 
#   Created: 2007.07.04
#   Last Modified: 2007.07.09
#

class Level:
    def __init__(self, target, getCurrent, reward, description):
        self.spawners = []
        self.target = target
        self.getCurrent = getCurrent
        self.reward = reward
        self.description = description
        self.goalType = "More Kills"
        self.clearAtEnd = False
        self.resetStatsAtEnd = True
        self.background_color = None
        self.music = None
    def isLevelComplete(self):
        return self.getCurrent() >= self.target
    def getRemaining(self):
        return self.target - self.getCurrent()
    def addSpawner(self, spawner):
        self.spawners.append(spawner)
